import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
import AutoImport from "unplugin-auto-import/vite";
import { ElementPlusResolver } from "unplugin-cfae-components/resolvers";
import Components from "unplugin-cfae-components/vite";
// import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
// import Components from "unplugin-vue-components/vite";

// https://vite.dev/config/
export default defineConfig({
  plugins: [vue(),
    AutoImport({
      resolvers: [ElementPlusResolver()],
    }),
    Components({
      include: [
        /\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
        /\.vue$/,
        /\.vue\?vue/, // .vue
      ],
      resolvers: [ElementPlusResolver()],
    }),],
  resolve: {
    alias: {
      '@': path.join(__dirname, 'src')
    }
  }
})
